package com.stark.wechat.message.in;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
import com.stark.wechat.core.Event;
import com.stark.wechat.core.MessageType;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * 取消关注事件
 *
 * @author <a href="mailto:mengbin@hotmail.com">Ben</a>
 * @version 1.0.0
 * @see <a href="https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Receiving_event_pushes.html#%E5%85%B3%E6%B3%A8%E4%BA%8B%E4%BB%B6">能力接入 / 基础消息与订阅通知 / 接收事件推送 / 关注/取消关注事件</a>
 * @since 2024/5/27
 */
@Data
@Accessors(chain = true)
@JsonIgnoreProperties(ignoreUnknown = true)
public class UnsubscribeEventMessage implements EventMessage {

    private static final long serialVersionUID = -8575772326274342929L;

    /**
     * 开发者微信号
     */
    @JacksonXmlProperty(localName = "ToUserName")
    private String toUserName;

    /**
     * 发送方账号（一个OpenID）
     */
    @JacksonXmlProperty(localName = "FromUserName")
    private String fromUserName;

    /**
     * 消息创建时间
     */
    @JacksonXmlProperty(localName = "CreateTime")
    private Long createTime;

    /**
     * 消息类型，event
     */
    @JacksonXmlProperty(localName = "MsgType")
    private MessageType msgType;

    /**
     * 事件类型，unsubscribe
     */
    @JacksonXmlProperty(localName = "Event")
    private Event event;

}
